package com.hnevc.mallserver3.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnevc.mallserver3.dto.CartDTO;
import com.hnevc.mallserver3.entity.Cart;
import com.hnevc.mallserver3.mapper.CartMapper;
import com.hnevc.mallserver3.service.CartService;
import com.hnevc.mallserver3.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CartServiceImpl extends ServiceImpl<CartMapper, Cart> implements CartService {

    @Autowired
    private CartMapper cartMapper;

    @Override
    public List<CartDTO> getCartItemsByMemberId(Long memberId) {
        return cartMapper.selectCartItemsByMemberId(memberId);
    }
}
